#include <bits/stdc++.h>
using namespace std;

int a, b, c, d, e, f;

typedef long long LL;
int main(int argc, char const *argv[])
{
    cin >> a >> b >> c >> d >> e >> f;

    int max1 = min(a, d);
    LL ans = 0;
    for (int i=0; i<=max1; ++i) {
        LL g = 1LL * i * e + 1LL * f * min(min(b, c), d-i);
        // printf("%lld\n", g);
        ans = max(ans, g);
    }
    printf("%lld\n", ans);
    return 0;
}
